package com.hundsun.cprs.yyt.service.scheduler;

import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;

import org.apache.commons.lang.time.DateUtils;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hundsun.cprs.yyt.service.account.service.AccountQuotaDailyService;

@Service("accountQuotaDailyQuartzService")
public class AccountQuotaDailyQuartzService implements Serializable{
    
    private Logger logger = Logger.getLogger(AccountQuotaDailyQuartzService.class);

    @Autowired
    private AccountQuotaDailyService accountQuotaDailyService;
    
    public void statQuotaDaily(){
        
        Date lastDay = DateUtils.addDays(Calendar.getInstance().getTime(), -1);
        
        if (logger.isDebugEnabled()) {
            logger.debug("开始统计上一天的配额消费发放情况");
        }
        accountQuotaDailyService.statQuotaDaily(lastDay);
    }
}
